/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "cex_estudios_complementarios")
@NamedQueries({
    @NamedQuery(name = "CexEstudiosComplementarios.findAll", query = "SELECT c FROM CexEstudiosComplementarios c")})
public class CexEstudiosComplementarios implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ces_id")
    private Integer cesId;
    @Size(max = 2147483647)
    @Column(name = "ces_hemograma")
    private String cesHemograma;
    @Size(max = 2147483647)
    @Column(name = "ces_imagenologia")
    private String cesImagenologia;
    @Size(max = 2147483647)
    @Column(name = "ces_otros")
    private String cesOtros;
    @JoinColumn(name = "che_id", referencedColumnName = "che_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private CexHemogramasOtros cexHemogramasOtros;
    @JoinColumn(name = "cco_id", referencedColumnName = "cco_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private CexConsulta cexConsulta;

    public CexEstudiosComplementarios() {
    }

    public CexEstudiosComplementarios(Integer cesId) {
        this.cesId = cesId;
    }

    public Integer getCesId() {
        return cesId;
    }

    public void setCesId(Integer cesId) {
        this.cesId = cesId;
    }

    public String getCesHemograma() {
        return cesHemograma;
    }

    public void setCesHemograma(String cesHemograma) {
        this.cesHemograma = cesHemograma;
    }

    public String getCesImagenologia() {
        return cesImagenologia;
    }

    public void setCesImagenologia(String cesImagenologia) {
        this.cesImagenologia = cesImagenologia;
    }

    public String getCesOtros() {
        return cesOtros;
    }

    public void setCesOtros(String cesOtros) {
        this.cesOtros = cesOtros;
    }

    public CexHemogramasOtros getCexHemogramasOtros() {
        return cexHemogramasOtros;
    }

    public void setCexHemogramasOtros(CexHemogramasOtros cexHemogramasOtros) {
        this.cexHemogramasOtros = cexHemogramasOtros;
    }

    public CexConsulta getCexConsulta() {
        return cexConsulta;
    }

    public void setCexConsulta(CexConsulta cexConsulta) {
        this.cexConsulta = cexConsulta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cesId != null ? cesId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CexEstudiosComplementarios)) {
            return false;
        }
        CexEstudiosComplementarios other = (CexEstudiosComplementarios) object;
        if ((this.cesId == null && other.cesId != null) || (this.cesId != null && !this.cesId.equals(other.cesId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.CexEstudiosComplementarios[ cesId=" + cesId + " ]";
    }
    
}
